package com.yangit.temp.common.util.file;

import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.util.Iterator;

import javax.imageio.ImageIO;
import javax.imageio.ImageReader;
import javax.imageio.stream.MemoryCacheImageInputStream;

import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;

@SuppressWarnings("restriction")
public class TestImageBinary {
	
	static BASE64Encoder encoder = new sun.misc.BASE64Encoder();

	static BASE64Decoder decoder = new sun.misc.BASE64Decoder();

	public static void main(String[] args) {
		// System.out.println(getImageBinary());

		base64StringToImage(
				"/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCADiANIDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZa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cDkjjvXSfss3k9r8W/CfkzyRb9TjjbY5XcpV8qcdQfSiis638JmlH+Kj9XpQAGHbJqhcAYPFFFfKvc+shsZcoGenasqdRk8DrRRUyNluEajf0Fef8A7QF9c6V8KtVubK4ls7lHi2zQOUcfOOhHNFFaUvjRE9mfDk1zNdww3E8rzTyzsZJZGLM/zt1J5Nd74RtIJ7T4kebDHJ9m0md4N6A+Uw0q9cFf7p3ojZHdFPUCiivqYfAfKVP4jPFPEOs6heaJJ9ovrmfduB8yZmyPm4OT7n8zXmt/czXF7NLLK8spHLuxJPfr9SaKK6o7M557j7ZQ4YsAx9TzWtYqPMseBzOAeP8AZNFFa9DN7npVrY20niG5R7eJ0DNhWQEdDXafCaJBp3hMbFw2ozRnjqvnY2/THGKKKURdTe8eaXZxeK9UjS0gRFZwqrGoAHPQYr548XgW+pN5QEf7s/c47CiigZreB4kvpNIW5RbhSTkSjcDx712vwKtILjxbB5sMcu2cbd6A457UUVEtg6n2104HAHaiiisCj//Z");
	}

	static String getImageBinary() {
		File f = new File("D://20090709442.jpg");
		BufferedImage bi;
		try {
			bi = ImageIO.read(f);
			ByteArrayOutputStream baos = new ByteArrayOutputStream();
			ImageIO.write(bi, "jpg", baos);
			byte[] bytes = baos.toByteArray();

			return encoder.encodeBuffer(bytes).trim();
		} catch (IOException e) {
			e.printStackTrace();
		}
		return null;
	}

	static void base64StringToImage(String base64String) {
		try {
			byte[] bytes1 = decoder.decodeBuffer(base64String);

			ByteArrayInputStream bais = new ByteArrayInputStream(bytes1);
			BufferedImage bi1 = ImageIO.read(bais);
			File w2 = new File("D://QQ.bmp");// 可以是jpg,png,gif格式
			ImageIO.write(bi1, "jpg", w2);// 不管输出什么格式图片，此处不需改动
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	/**
	 * -根据字节流获取图片类型
	 */
	public static String getImageType(byte[] imageBytes) {
		try {
			MemoryCacheImageInputStream memoryCacheImageInputStream = new MemoryCacheImageInputStream(
					new ByteArrayInputStream(imageBytes));
			Iterator<ImageReader> itr = ImageIO.getImageReaders(memoryCacheImageInputStream);
			while (itr.hasNext()) {
				ImageReader reader = itr.next();
				String imageName = reader.getClass().getSimpleName();
				if (imageName != null) {
					if ("JPEGImageReader".equalsIgnoreCase(imageName)) {
						return "jpeg";
					}
					if ("JPGImageReader".equalsIgnoreCase(imageName)) {
						return "jpg";
					}
					if ("pngImageReader".equalsIgnoreCase(imageName)) {
						return "png";
					}
				}
			}
		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
		}
		return null;
	}
}